import Cookies from 'js-cookie'

const SettingsKey = 'PorkingLot-Admin-Settings'

export function getSettings() {
  const settings = Cookies.get(SettingsKey)
  if (settings) { return JSON.parse(settings) }
  return null
}

export function setSettings(settings) {
  return Cookies.set(SettingsKey, settings)
}

export function removeSettings() {
  return Cookies.remove(SettingsKey)
}
